The Spatial Settings Request Type
Use the spatial settings request to retrieve or modify the current spatial compression parameters. These parameters control how each image is compressed.
You supply a pointer to a spatial settings structure. If you are retrieving these settings, the standard dialog component places the current settings into the specified structure; if you are changing the settings, place the new values into the structure--the component uses those values to update its settings.
The
SCSpatialSettings
data type defines the format and content of the spatial settings structure:
typedef struct {
CodecType codecType; /* compressor type */
CodecComponent codec; /* compressor */
short depth; /* pixel depth */
CodecQ spatialQuality; /* desired quality */
} SCSpatialSettings;
-
codecType
-
Specifies the default compressor type that is displayed in the pop-up menu of compressors in the dialog box. The standard image-compression dialog component uses this field to return the compressor type that was selected by the user.
-
You must set this parameter to one of the compressor types supported by the Image Compression Manager, or to
nil
.
-
If you set the field to
nil
, the standard image-compression dialog component uses as the default value the first compressor or compressor type that it retrieves from the Image Compression Manager.
-
codec
-
Provides additional information about the default compressor that is displayed in the pop-up menu of compressors in the dialog box. If the user selects a specific compressor component, the standard image-compression dialog component returns the appropriate compressor identifier in this field.
-
The
scListEveryCodec
bit in the flag in the
scPreferenceFlagsType
request influences the operation of the compressor list in the dialog box and, therefore, the way the component uses this field.
-
Set the flag to 1 to have the list contain an entry for each compressor component in the system. If the flag is set to 1, the standard image-compression dialog component uses this field along with the
codecType
field to select the default compressor that appears in the dialog box. To specify a default image compressor component, set this field to the appropriate compressor identifier. When the user clicks OK in the dialog box, the standard image-compression dialog component returns the compressor identifier that corresponds to the selected image compressor component.
-
If you set the field to
nil
, the standard image-compression dialog component uses as the default value the first compressor of the specified type that it retrieves from the Image Compression Manager.
-
If you have set the flag to 0, the list contains only one entry for each type of compressor in the system. The standard image-compression dialog component ignores this field when creating the list of compressor types. In this case, the standard image-compression dialog component does not change the value of this field when the user clicks OK.
-
However, you may use this field to specify additional selection criteria by setting this field to one of the special compressor identifiers supported by the Image Compression Manager (see the chapter "Image Compression Manager" in
Inside Macintosh: QuickTime
for these special values). The standard image-compression dialog component may use this value when it validates the compression parameters selected by the user.
-
depth
-
Specifies the default value of the pixel depth pop-up menu in the dialog box. This menu allows the user to select the color or gray scale resolution value to be used when compressing the image or image sequence. If you set this field to 0, the component chooses an appropriate depth for the default compressor you specified with the
theCodec
field. See the chapter "Image Compression Manager" in
Inside Macintosh: QuickTime
for other valid pixel depth values.
-
When the user clicks OK, the standard image-compression dialog component sets this field to the pixel depth value selected by the user. Note that the standard image-compression dialog component may adjust the depth value so that it corresponds to a value that is supported by the compressor that has been selected by the user.
-
The depth returned could be 0 if the
scShowBestDepth
flag is set.
-
spatialQuality
-
Specifies the default setting of the quality slider in the dialog box. This slider controls the spatial quality of the compressed image sequence, which influences the amount of spatial compression that can be achieved. Spatial compression eliminates redundant information within each frame in a sequence. See the chapter "Image Compression Manager" in
Inside Macintosh: QuickTime
for valid compression quality values.
-
When the user clicks OK, the standard image-compression dialog component sets this field to the spatial quality value selected by the user. Note that the standard image-compression dialog component may adjust the quality value so that it corresponds to a value that is supported by the compressor that has been selected by the user.
© 1997 Apple Computer, Inc.Previous | Chapter Top | Chapter Contents | Next